package com.lipiao.traveltreasure.service.impl.restaurant;

import com.lipiao.traveltreasure.bean.restaurantBean.User;
import com.lipiao.traveltreasure.dao.restaurant.UserMapper;
import com.lipiao.traveltreasure.service.restaurant.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {

    //注入Mapper接口对象
    @Resource
    private UserMapper userMapper;

    @Override
    public void addUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public List<User> queryAllUser() {
        return userMapper.queryAllUser();
    }
}
